﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lidgren.Network;
using Model.CursorConvert;

namespace Network.Messages.LiveControl
{
    public class CursorMessage : NovaMessage
    {

        public CursorMessage() : base((ushort)CustomMessageType.CursorMessage)
        {
        }

        public Cursor Cursor;
        public override void WritePayload(NetOutgoingMessage message)
        {
            base.WritePayload(message);
            message.Write(CursorHelper.Name(Cursor));
        }

        public override void ReadPayload(NetIncomingMessage message)
        {
            base.ReadPayload(message);
            Cursor = CursorHelper.GetCursor(message.ReadString());
        }
    }
}
